package com.isp.org.server.domain.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.isp.org.api.dto.menu.SysMenu;
import com.isp.org.server.domain.entity.RoleMenuEntity;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Set;

/**
 * @author linsy
 * @version 1.0
 * @created 2024/3/12 17:17
 */
@Mapper
public interface RoleMenuMapper extends BaseMapper<RoleMenuEntity> {

    List<SysMenu> findMenusByRoleCodes(String app, Set<String> roleCodes, Integer type);

    List<SysMenu> findMenusByRoleIds(String app, Set<Long> roleIds, Integer type);

    List<SysMenu> findAll(String app);

    void delete(Long roleId, Long menuId);

}
